import java.lang.*;
import java.io.*;
public class Mail{
public void sendMail( String smtpServer, String sender,
                      String reciever, String msg,
                      boolean showOutput ) {
  try {
    String cmd;
    cmd = "C:\\febootimail.exe";
    cmd += " -SERVER " + smtpServer;
    cmd += " -FROM " + sender;
    cmd += " -TO " + reciever;
    cmd += " -MSG " + msg;
    Process p = Runtime.getRuntime().exec(cmd);

    // Capture the output - note: inputstream contains the output
    if (showOutput) {
      DataInputStream in = new DataInputStream(p.getInputStream());
      try {
        String oneLine;
        while ((oneLine = in.readLine()) != null)
          System.out.println(oneLine);
      } catch (IOException e) {}
    }

  } catch (IOException e1) {
    System.out.println(e1);
  }
}}